//2009/08/17 02:25:34
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class WarCry
{
public:
    int alertTime(string out)
    {
        int ret = -1;
        int head = 0;
        int end = out.size() -1;
        for (int i=0; i<out.size(); i++) if (out[i] == 'x')
            {
                ret = max(ret, i);
                head = i;
				cout << ret << " ret, head: " << head << endl;
                break;
            }
        for (int i=out.size()-1; i>=0; i--) if (out[i] == 'x')
            {
                ret = max(ret, (int)out.size() - i - 1);
                end = i;
				cout << ret << " ret, end: " << end << endl;
                break;
            }
        int pre = head;
        for (int i=head; i<=end; i++)
        {
            if (out[i] == 'x')
            {
                ret = max(ret, (i-pre)/2);
				cout << "ret: " << ret << endl;
                pre = i;
            }
        }
        return ret;
    }
};
